package com.tale.competition.controller;

import com.tale.competition.common.util.R;
import com.tale.competition.common.vo.MailBean;
import com.tale.competition.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * author: 蔡奇峰
 * date: 2020/4/30 14:07
 **/
@RequestMapping("/mq")
@RestController
public class RabbitMqController {

    @Autowired
    private MailService service;

    @RequestMapping("mail")
    public R test(){
        service.sendTopic("您已经注册成功！欢迎使用");
//        service.sendMail("注册成功！");

        return R.ok();
    }



}
